package com.cema.manage.project.manage.users.domain;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户账号表 biz_users
 *
 * @author reasahi
 * @date 2024-07-08
 */
@TableName(value = "biz_users")
public class Users extends Model<Users> {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id")
    private Integer id;
    /**
     * 设备id
     */
    @TableField(value = "device_id")
    private String deviceId;
    /**
     * 用户头像
     */
    @TableField(value = "picture")
    private String picture;
    /**
     * 昵称
     */
    @TableField(value = "nickname")
    private String nickname;
    /**
     * 推荐人Id
     */
    @TableField(value = "us_parent_id")
    private Integer usParentId;

    /**
     * 金币
     */
    @TableField(value = "money_gold_coin")
    private Integer moneyGoldCoin;
    /**
     * 红包
     */
    @TableField(value = "money_red_packet")
    private Integer moneyRedPacket;

    /**
     * 金币佣金
     */
    @TableField(value = "money_commission_gold_coin")
    private Integer moneyCommissionGoldCoin;
    /**
     * 红包佣金
     */
    @TableField(value = "money_commission_red_envelope")
    private Integer moneyCommissionRedEnvelope;
    /**
     * 推广佣金
     */
    @TableField(value = "money_extension_red_envelope")
    private Integer moneyExtensionRedEnvelope;
    /**
     * 邀请码
     */
    @TableField(value = "code")
    private String code;
    /**
     * 姓名（真实）
     */
    @TableField(value = "afb_name")
    private String afbName;
    /**
     * 手机号
     */
    @TableField(value = "afb_phone")
    private String afbPhone;
    @TableField(value = "join_ip")
    private String joinIp;
    @TableField(value = "login_ip")
    private String loginIp;
    /**
     * 累计天数
     */
    @TableField(value = "sign_in_number")
    private Integer signInNumber;
    /**
     * 连续签到天数
     */
    @TableField(value = "sign_id_day_number")
    private Integer signIdDayNumber;
    /**
     * 累计登录天数
     */
    @TableField(value = "login_day_number")
    private Integer loginDayNumber;
    /**
     * 连续登录天数
     */
    @TableField(value = "login_in_day_number")
    private Integer loginInDayNumber;
    /**
     * 今天是否签到 1已签到 0未签到
     */
    @TableField(value = "sign_in")
    private Integer signIn;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;
    /**
     * 创建时间
     */
    @TableField(value = "login_time")
    private Date loginTime;


    /**
     * 佣金比例
     */
    private Integer kickback;

    /**
     * 账号状态 1正常用户 2账号违规封号
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 是否有效 1有效 2无效
     */
    @TableField(value = "effective")
    private Integer effective;

    @TableField(value = "openid")
    private String openid;

    @TableField(value = "unionid")
    private String unionid;

    @TableField(value = "oaid")
    private String oaid;

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        if (StrUtil.isNotEmpty(openid)) {
            this.openid = openid;
        } else {
            this.openid = null;
        }
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getOaid() {
        return oaid;
    }

    public void setOaid(String oaid) {
        this.oaid = oaid;
    }

    /**
     * 设置：ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取：ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置：设备id
     */
    public void setDeviceId(String deviceId) {
        if (deviceId != null) {
            if (deviceId.trim().isEmpty()) {
                this.deviceId = null;
            } else {
                this.deviceId = deviceId;
            }
        }
    }

    /**
     * 获取：设备id
     */
    public String getDeviceId() {
        return deviceId;
    }

    /**
     * 设置：用户头像
     */
    public void setPicture(String picture) {
        if (picture != null) {
            if (picture.trim().isEmpty()) {
                this.picture = null;
            } else {
                this.picture = picture;
            }
        }
    }

    /**
     * 获取：用户头像
     */
    public String getPicture() {
        return picture;
    }

    /**
     * 设置：昵称
     */
    public void setNickname(String nickname) {
        if (nickname != null) {
            if (nickname.trim().isEmpty()) {
                this.nickname = null;
            } else {
                this.nickname = nickname;
            }
        }
    }

    public Integer getUsParentId() {
        return usParentId;
    }

    public void setUsParentId(Integer usParentId) {
        this.usParentId = usParentId;
    }

    /**
     * 获取：昵称
     */
    public String getNickname() {
        return nickname;
    }

    /**
     * 设置：金币
     */
    public void setMoneyGoldCoin(Integer moneyGoldCoin) {
        this.moneyGoldCoin = moneyGoldCoin;
    }

    /**
     * 获取：金币
     */
    public Integer getMoneyGoldCoin() {
        return moneyGoldCoin;
    }

    /**
     * 设置：红包
     */
    public void setMoneyRedPacket(Integer moneyRedPacket) {
        this.moneyRedPacket = moneyRedPacket;
    }

    /**
     * 获取：红包
     */
    public Integer getMoneyRedPacket() {
        return moneyRedPacket;
    }

    /**
     * 设置：邀请码
     */
    public void setCode(String code) {
        if (code != null) {
            if (code.trim().isEmpty()) {
                this.code = null;
            } else {
                this.code = code;
            }
        }
    }

    /**
     * 获取：邀请码
     */
    public String getCode() {
        return code;
    }

    /**
     * 设置：姓名（真实）
     */
    public void setAfbName(String afbName) {
        if (afbName != null) {
            this.afbName = afbName;
        }
    }

    /**
     * 获取：姓名（真实）
     */
    public String getAfbName() {
        return afbName;
    }

    /**
     * 设置：手机号
     */
    public void setAfbPhone(String afbPhone) {

        this.afbPhone = afbPhone;
    }

    /**
     * 获取：手机号
     */
    public String getAfbPhone() {
        return afbPhone;
    }

    /**
     * 设置：累计天数
     */
    public void setSignInNumber(Integer signInNumber) {
        this.signInNumber = signInNumber;
    }

    /**
     * 获取：累计天数
     */
    public Integer getSignInNumber() {
        return signInNumber;
    }

    /**
     * 设置：连续签到天数
     */
    public void setSignIdDayNumber(Integer signIdDayNumber) {
        this.signIdDayNumber = signIdDayNumber;
    }

    /**
     * 获取：连续签到天数
     */
    public Integer getSignIdDayNumber() {
        return signIdDayNumber;
    }

    /**
     * 设置：创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取：创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public String getJoinIp() {
        return joinIp;
    }

    public void setJoinIp(String joinIp) {
        this.joinIp = joinIp;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Integer getSignIn() {
        return signIn;
    }

    public void setSignIn(Integer signIn) {
        this.signIn = signIn;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getKickback() {
        return kickback;
    }

    public void setKickback(Integer kickback) {
        this.kickback = kickback;
    }

    public Integer getLoginDayNumber() {
        return loginDayNumber;
    }

    public void setLoginDayNumber(Integer loginDayNumber) {
        this.loginDayNumber = loginDayNumber;
    }

    public Integer getLoginInDayNumber() {
        return loginInDayNumber;
    }

    public void setLoginInDayNumber(Integer loginInDayNumber) {
        this.loginInDayNumber = loginInDayNumber;
    }

    public Integer getEffective() {
        return effective;
    }

    public void setEffective(Integer effective) {
        this.effective = effective;
    }

    public Integer getMoneyCommissionGoldCoin() {
        return moneyCommissionGoldCoin;
    }

    public void setMoneyCommissionGoldCoin(Integer moneyCommissionGoldCoin) {
        this.moneyCommissionGoldCoin = moneyCommissionGoldCoin;
    }

    public Integer getMoneyCommissionRedEnvelope() {
        return moneyCommissionRedEnvelope;
    }

    public void setMoneyCommissionRedEnvelope(Integer moneyCommissionRedEnvelope) {
        this.moneyCommissionRedEnvelope = moneyCommissionRedEnvelope;
    }

    public Integer getMoneyExtensionRedEnvelope() {
        return moneyExtensionRedEnvelope;
    }

    public void setMoneyExtensionRedEnvelope(Integer moneyExtensionRedEnvelope) {
        this.moneyExtensionRedEnvelope = moneyExtensionRedEnvelope;
    }
}

